#include "bottle1.h"

bottle1::bottle1(QObject *parent) : QObject(parent)
{
    bot1_bottle.load(":/imagine/bottle1.png");
    mrect.setWidth(bot1_bottle.width());
    mrect.setHeight(bot1_bottle.height());
    mrect.moveTo(nX,nY);
}

void bottle1::born()
{
    nX=1600;
}

void bottle1::updatePosition()
{
    if(state==true)
    {
        if(nX>=0)
        {
            nX-=2;
        }
        else
        {
            nX=-1600;
            state=false;
        }
    }
    mrect.moveTo(nX,nY);
}
